<?
    include "../common.php";
    $username = $_POST['username'];
    $tel = $_POST['tel'];
    $password = $_POST['password'];
    $ulevel = $_POST['ulevel'];
    $now = Time();
    $sql = "INSERT INTO users (userName, `passWord`, ulevel, tel, uTime) VALUES 
            ('{$username}','{$password}',{$ulevel},{$tel},{$now})" ; 
    $res = mysqli_query($link,$sql);
    $arr = [] ;
    if( $res ){
        $arr['status'] = 1 ;
        $arr['info'] = '注册成功' ;
    } else {
        $arr['status'] = 0 ;
        $arr['info'] = '操作失败' ;
    }
    echo json_encode($arr);
?>